# -*- coding: utf-8 -*-
'''
Created on 2011-12-12

@author: Administrator
'''
from django import forms
from django.forms.widgets import TextInput
from main.models import Rest_apply, Rest, Rest_cuis_type, Rest_dish, \
    Rest_intro_img, Rest_ad_img
from uuid import uuid4

attrs_dict = { 'class': 'required' }

#餐厅加盟申请Form
class RestApplayForm(forms.ModelForm):
    #id = forms.CharField(widget=forms.HiddenInput(),null=True)
    class Meta:
        exclude = ('user')
        model = Rest_apply
#餐厅信息from 
class RestForm(forms.ModelForm):
    #id = forms.CharField(widget=forms.HiddenInput(),null=True)
    
    class Meta:
        exclude = ('user','state','weight',)
        model = Rest

#餐厅菜式分类form
class RestCuisTypeForm(forms.ModelForm):
    class Meta:
        exclude = ('id','rest','weight','level')
        model = Rest_cuis_type
        
class RestDishForm(forms.ModelForm):
    weight = forms.CharField(widget=forms.HiddenInput())
    state = forms.BooleanField(widget=forms.HiddenInput())
    class Meta:
        exclude = ('id','rest')
        model = Rest_dish
class RestIntroImg(forms.ModelForm):
    class Meta:
        exclude=('rest','weight')
        model = Rest_intro_img

class RestAdImg(forms.ModelForm):
    class Meta:
        exclude=('rest','weight')
        model = Rest_ad_img
